<!--云闪推——开头/片尾库-->
<template>
  <div class="ele-body">
    <el-card
      shadow="never"
      header="开头视频"
      body-style="padding: 23px;"
    >
      <el-button
        size="small"
        type="primary"
        class="ele-btn-icon"
        icon="el-icon-upload2"
        @click="openFolderUpload"
      >
        上传
      </el-button>
      <!--:disabled="!checked.length"-->
      <el-button
        size="small"
        type="danger"
        icon="el-icon-delete"
        style="margin-left: 10px"
        class="ele-btn-icon hidden-xs-only"
        @click="removeBatch"
      >
        删除
      </el-button>

      <el-radio-group v-model="radio">
      <div class="flex-between m-top20">
        <div class="piece-cls relative" v-for="(i,j) in list" :key="j">
          <el-radio size="medium" class="radio-cls" :label="j" @input="input">{{ '' }}</el-radio>
          <el-image :src="i.img"></el-image>
        </div>
      </div>
    </el-radio-group>
    </el-card>
    <el-card
      shadow="never"
      header="片尾视频"
      body-style="padding: 23px;"
    >
      <el-button
        size="small"
        type="primary"
        class="ele-btn-icon"
        icon="el-icon-upload2"
        @click="openFolderUpload"
      >
        上传
      </el-button>
      <!--:disabled="!checked.length"-->
      <el-button
        size="small"
        type="danger"
        icon="el-icon-delete"
        style="margin-left: 10px"
        class="ele-btn-icon hidden-xs-only"
        @click="removeBatch"
      >
        删除
      </el-button>

      <el-radio-group v-model="radio">
        <div class="flex-between m-top20">
          <div class="piece-cls relative" v-for="(i,j) in list" :key="j">
            <el-radio size="medium" class="radio-cls" :label="j" @input="input">{{ '' }}</el-radio>
            <el-image :src="i.img"></el-image>
          </div>
        </div>
      </el-radio-group>
    </el-card>
    <!-- 上传文件弹窗 -->

    <file-upload
      :visible.sync="folderUpload"
      @done="onDone"
    />
  </div>
</template>

<script>
  import FileUpload from "./components/file-upload";
  export default {
    name: "index",
    components: {FileUpload},
    data(){
      return{
        radio: 0,
        list:[{
          img:"https://yunhunjian123.oss-cn-shanghai.aliyuncs.com/1700897641057.jpg"
        },{
          img:"https://yunhunjian123.oss-cn-shanghai.aliyuncs.com/1700897641057.jpg"
        },{
          img:"https://yunhunjian123.oss-cn-shanghai.aliyuncs.com/1700897641057.jpg"
        },{
          img:"https://yunhunjian123.oss-cn-shanghai.aliyuncs.com/1700897641057.jpg"
        },{
          img:"https://yunhunjian123.oss-cn-shanghai.aliyuncs.com/1700897641057.jpg"
        },
        ],
        // 上传图片 弹框标识
        folderUpload:false
      }
    },
    methods:{
      input(e){
        console.log("进入输入框e======",e)
      },
      /* 打开上传文件弹窗 */
      openFolderUpload() {
        this.folderUpload = true;
      },
      // 刷新
      onDone(){

      }
    }
  }
</script>

<style lang="less" scoped>
  .piece-cls{
    width: calc(100%/5 - 20px);
    .radio-cls{
      z-index: 999;
      position: absolute;
      top: 10px;
      max-height: 146px;
      right: -30px;
    }
  }
</style>
